-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
CLN: Remove unnecessary code #23696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN: Remove unnecessary code #23696
Conversation
No need to pass an empty array to create an empty frozenset.
Hello @suminb! Thanks for submitting the PR.
|
ok sure |
Codecov Report
@@ Coverage Diff @@
## master #23696 +/- ##
==========================================
+ Coverage 92.24% 92.24% +<.01%
==========================================
Files 161 161
Lines 51318 51340 +22
==========================================
+ Hits 47339 47361 +22
Misses 3979 3979
Continue to review full report at Codecov.
|
@@ -59,7 +59,7 @@ def coerce(request): | |||
({'a', 1}, 'set', 'set'), # noqa: E241 | |||
(set(), 'set', 'set-empty'), # noqa: E241 | |||
(frozenset({'a', 1}), 'set', 'frozenset'), # noqa: E241 | |||
(frozenset([]), 'set', 'frozenset-empty'), # noqa: E241 | |||
(frozenset(), 'set', 'frozenset-empty'), # noqa: E241 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the noqa still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this has to do with liniing things up.
thanks @suminb |
frozenset()
andfrozenset([])
essentially produce identical results, and thus there is no need to pass an empty list to create an emptyfrozenset
.git diff upstream/master -u -- "*.py" | flake8 --diff